import { request } from "@/utils/request"
//创建题目
export function newQues (data) {
  return request({
    url: 'question/newQuestion',
    method: 'post',
    data: data
  })
}
//查询题目列表
export function getQues (data) {
  return request({
    url: 'question/getAllQuestions',
    method: 'post',
    data: data
  })
}
//条件查询
export function searchQues (data) {
  return request({
    url: 'question/search',
    method: 'get',
    params: data
  })
}
//删除题目
export function deleteQues (data) {
  return request({
    url: 'question/deleteQuestion',
    method: 'post',
    params: data
  })
}
//修改题目
export function updateQues (data) {
  return request({
    url: 'question/update',
    method: 'post',
    data: data
  })
}
//新建试卷
export function newPaper (data) {
  return request({
    url: 'paper/addPaper',
    method: 'post',
    data: data
  })
}
//删除试卷
export function deletePaper (data) {
  return request({
    url: 'paper/deletePaper',
    method: 'get',
    params: data
  })
}
//条件查询
export function searchPaper (data) {
  return request({
    url: 'paper/searchPaper',
    method: 'post',
    data: data
  })
}
//试卷题目
export function paperQues (data) {
  return request({
    url: 'paper/getQuestions',
    method: 'post',
    data: data
  })
}
//修改试卷
export function updatePaper (data) {
  return request({
    url: 'paper/updatePaper',
    method: 'post',
    data: data
  })
}  